def lucky_sum(a, b, c):
  sun = 0
  if a == 13:
    sum = 0 
  else:
    if b ==13:
      sum = a
    else:
      if c == 13:
        sum = a + b
      else:
        sum = a + b + c
  return sum